package org.qingke.mail.backend.service;

import org.qingke.mail.common.Response;
import org.qingke.mail.domain.TbUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * 后台用户业务实现
 * @author JAVA
 *
 */
@Service("userService")
public class UserServiceImpl implements UserService {
	
	@Autowired
    private RestTemplate restTemplate;
	
	@Override
	public Response insert(TbUser user) {
		return restTemplate.postForEntity("http://USER-SERVER/user/insert", user, Response.class).getBody();
	}
	

}
